/**
 * 类
 */
object chapter5 {


  def main(args: Array[String]): Unit = {
    val myCounter = new Counter
    myCounter.increment()
    println(myCounter.current)
    // 不需要 getter and setter: 声明 private[this]
  }

}
